<?php
session_start();
include ("secure/connect.php");
if(!defined('INSTALLED')){

	if($_SERVER['SCRIPT_NAME'] != ""){
		$add = $_SERVER['SCRIPT_NAME'];
		$parts = explode("/", $add);
		array_pop($parts);
		array_pop($parts);
		$origadd = implode("/", $parts);
	}
	$site_name ="http://".$_SERVER['HTTP_HOST'];
	$site_name = trim($site_name, "/");
	$site_name = $site_name.$origadd."/";	
	
	//$ins_site_name ="http://".$_SERVER['HTTP_HOST'];
	header("location:$site_name"."install/");
	exit;
}
include ("objects/statistics.php");
include ("objects/earnings.php");
include ("objects/users.php");
include ("objects/mysql.php");
include ("objects/files.php");
include ("objects/settings.php");
include ("objects/cms.php");
include ("objects/gateway.php");

function clean($var)
{
	if(is_array($var))
	{
		$var_temp = array();
		foreach($var as $k=>$v)
		{
			if(is_array($v))
			{
				$var_temp[$k] =$v;	
				continue;
			}
			$var_temp[$k] = addslashes(trim($v));	
		}
		return($var_temp);
	}
	else
		return addslashes(trim($var));	

}

?>